package cn.liit.weixin.jssdk.share.utils;

import java.util.Map;

import cn.liit.weixin.jssdk.basic.JssdkConfig;

/**
 * 微信分享提供类
 * @author zhangboqi
 *
 */
public class WeixinShareUtil {
	
	/**
	 * 微信分享
	 * @param url 当前调用jssdk的url
	 * @param jsapi_ticket 
	 * @param link 分享链接
	 * @param imgUrl 分享图标
	 * @return 返回js参数的map对象
	 * @throws Exception 
	 */
	public static Map<String,Object> share(String url,String jsapi_ticket,String link,String imgUrl) throws Exception{
		//配置jssdk
		Map<String,Object> result = JssdkConfig.config(url, jsapi_ticket);
		result.put("imgUrl", imgUrl);
		result.put("link",link);
		return result;
	}
}
